Collect Flows signup decisions on the web - #116
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
| {complete ? <a onClick={() => { if (token) analytics.track('dashboard_opened', active); }} className={s.primary} href={teamsCloudUrl(product === 'teams' ? '/dashboard/sessions' : '/dashboard')}>Open {product === 'teams' ? 'your workspace' : 'dashboard'} <ArrowUpRight size={17} /></a> | ||
| : !active ? <button type="button" className={s.primary} disabled={!prompt || expired} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null} | ||
| <p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p> | ||
| <p className={s.copyStatus} role="status">{complete ? '' : notice ? 'No action is required to keep this draft saved.' : active ? (inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p> |
There was a problem hiding this comment.
Pending input ignored at step zero
Low Severity
heading and the input card treat a pending inputRequest as actionable at any step, but the subtitle, agent logos, and copy-prompt button still key off active. A question posted while step is 0 keeps the original waiting copy and CTA beside the new answer form.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0c83f55. Configure here.
…elay.com into fix/agentrelay-116-review # Conflicts: # web/components/AgentSignupJourney.tsx
|
Review audit + base merge at
Tests: |
…elay.com into fix/agentrelay-116-review
| <p className={s.copyStatus} role="status">{complete ? '' : active ? (paused ? 'Your agent will continue after you approve.' : 'You can leave this page open.') : copyMessage || (expired ? '' : progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p> | ||
| : !active && !expired && inputRequest?.status !== 'pending' ? <button type="button" className={s.primary} disabled={!prompt} onClick={() => void copy()}>{copyMessage.startsWith('Copied') ? <Check size={17} /> : <Copy size={17} />}{copyMessage.startsWith('Copied') ? 'Prompt copied' : 'Copy setup prompt'}</button> : null} | ||
| <p className={s.copyStatus} role="status">{complete ? '' : expired ? '' : notice ? 'No action is required to keep this draft saved.' : inputRequest?.status === 'pending' ? 'Your answer goes straight to your agent.' : active ? (paused ? (product === 'flows' && inputRequest?.status === 'answered' ? 'Your agent is processing your answer.' : 'Your agent will continue after you approve.') : 'You can leave this page open.') : copyMessage || (progress && !token ? 'Watching this session. The prompt is in the original browser tab.' : product === 'teams' ? 'Paste into a coding agent on your Mac.' : 'Paste into a coding agent with terminal access.')}</p> | ||
| {inputRequest && !expired && !complete && (inputRequest.status === 'pending' || paused) && <section className={s.inputCard} aria-label={notice ? 'Flow preview status' : 'Question from your agent'}> |
There was a problem hiding this comment.
Answered input lost at step zero
Medium Severity
After a Flows answer succeeds while progress is still at step 0, paused stays false, so the input card and “answer received” copy never appear. The page falls back to the initial waiting state and shows Copy setup prompt again, which hides confirmation and can look like setup reset.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 179fd84. Configure here.
miyaontherelay
left a comment
There was a problem hiding this comment.
NO-GO — review at exact head 179fd84, against stacked #112 base e8d60fb.
The #112 stack dependency is correct and #112 is independently GO at e8d60fb. However #116 is not merge-ready at this exact head:
- Deploy Preview is terminal FAILURE (run 35821318463, job 107053596618). Tests/typecheck pass, but the failed preview must be fixed and rerun successfully.
- The diff commits two absolute local node_modules symlinks: node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/node_modules and web/node_modules -> /home/khaliqgant/Projects/AgentWorkforce/agentrelay-112-fix/web/node_modules. These are non-reproducible machine-local paths and must be removed before merge.
The input-request journey changes otherwise preserve the progress-token boundary and answer handling, but I cannot give GO while the preview is failing and repository contains machine-local dependency links. Please push a corrected head, rerun exact-head CI/preview, and request re-review.
Session-Id: 01a0cc08-1399-7b02-871e-542dc1e28509
| // An answered web-input request can arrive before the agent advances the | ||
| // numbered progress step. Keep the response card visible at step 0 so the | ||
| // user sees confirmation instead of the initial copy-prompt state. | ||
| const answeredInput = product === 'flows' && inputRequest?.status === 'answered'; |
There was a problem hiding this comment.
Answered input overrides later progress
Medium Severity
answeredInput is true for any answered inputRequest, so it now wins over a later working step. After the first answer, heading, mode, and the input card can stay on confirmation instead of the current setup step.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 7528c00. Configure here.
| <div className={s.progress} role="status" aria-live="polite"> | ||
| <div className={s.progressDots} aria-hidden="true">{steps.map((step, index) => <i key={step.title} data-done={complete || active > index + 1} data-current={!complete && active === index + 1} />)}</div> | ||
| <span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span> | ||
| <span>{expired ? 'Session expired' : error ? 'Waiting for a connection' : complete ? 'Setup complete' : notice ? `${active} of 5 · Preview saved; activation pending` : inputRequest?.status === 'pending' ? 'Waiting for your answer' : answeredInput ? `${active} of 5 · Answer received` : active ? `${active} of 5 · ${paused ? 'Waiting for your approval' : failed ? 'Needs your attention' : steps[active - 1].title}` : progress ? 'Ready when your agent is' : 'Preparing your session…'}</span> |
There was a problem hiding this comment.
Progress label shows zero of five
Low Severity
An answered request at step 0 now renders the live progress label as 0 of 5 · Answer received. The five setup steps are 1-based, so that count is wrong. Pending input at step 0 already omits a step number.
Reviewed by Cursor Bugbot for commit 7528c00. Configure here.
| // An answered web-input request can arrive before the agent advances the | ||
| // numbered progress step. Keep that step-zero confirmation visible, but do | ||
| // not let a stale answered request override a later progress step. | ||
| const answeredInput = product === 'flows' && active === 0 && inputRequest?.status === 'answered'; |
There was a problem hiding this comment.
Answered input treated as approval
Medium Severity
answeredInput is true only at step 0, but Flows web-input questions are asked at the current waiting step. After submit, heading, subtitle, and progress therefore fall through to approval-waiting copy, while paused can also keep a stale answered inputRequest card visible during a later real approval.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit a4ea273. Configure here.
There was a problem hiding this comment.
All reported issues were addressed across 8 files
You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f6203be. Configure here.
| const observedInputStep = observedInput && observedInput.id === inputRequest?.id ? observedInput.step : active; | ||
| // Keep confirmation visible at the step where the question was observed, | ||
| // including step zero. A stale answer must not override later progress. | ||
| const answeredInput = inputRequest?.status === 'answered' && progress?.state === 'waiting' && observedInputStep === active; |
There was a problem hiding this comment.
Reload treats leftover answers as current
Medium Severity
When inputRequestStep has no matching observation, observedInputStep falls back to active, so answeredInput is true for any answered request still in waiting. A reload, session restore, or late watcher that first sees a leftover answered inputRequest at a later approval step shows answer-received copy instead of the approval state.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f6203be. Configure here.
miyaontherelay
left a comment
There was a problem hiding this comment.
Superseding exact-head review at 4710e6f. The prior CHANGES_REQUESTED review was for 179fd84 and is superseded: Deploy Preview now succeeds, the tracked absolute node_modules symlinks are removed, and the answered-input-at-step-zero defect is fixed with step-bound rendering/regressions. Fresh Tests/typecheck, Deploy Preview, Cursor, and Cubic checks are successful. Independent exact-head audit reports no remaining substantive blocker. Approve current head pending final mergeability/dependency gate recheck.


Builds on #112.
Moves the agent signup follow-up answers into the Flows signup page, with web-based selection/text controls, a saved-draft result, and copy that keeps local house-key and sync constraints accurate. Agent actions still go through the Cloud progress/input APIs; the page never receives the progress token.
Validation: all 320 marketing workspace tests pass (248 web, 72 router); diff check clean.
Dependent Cloud API PR follows. Before merging to main, rebase/retarget after #112. The separate Codex wake-up/injection work remains with the other agent.
Note
Medium Risk
Adds a new authenticated PUT path and UI for signup answers tied to the progress token; incorrect validation or copy could block Flows onboarding, but scope is limited to the signup funnel rather than core auth.
Overview
Flows agent signup now collects repository, workflow, and approver choices on the signup page instead of in chat. Progress polling can surface an
inputRequest(text, select, or inactive-preview notice); the owning tab submits answers with PUT and the progress write token, with UI and copy for pending, answered, and draft-saved states.Agent-facing docs and prompts add the web-input protocol (POST to request, poll GET for answers), tighten Flows integration polling (
oauth.connected, sync readiness), and document house-key / draft-notice behavior. Progress typing validatesinputRequest(including restricted noticeactionHref).Local dev: the
/signup/agent/[product]route preserveslocalhostvs127.0.0.1from theHostheader when Next normalizesrequest.url, so guide URLs match the browser for OAuth and the progress page.Tests cover validation, guide strings, hostname edge cases, and an e2e path for answered inputs at step zero.
Reviewed by Cursor Bugbot for commit 4710e6f. Bugbot is set up for automated code reviews on this repo. Configure here.